package com.yuyou.train.user.service;

import com.yuyou.train.service.api.lesson.entity.Lesson;
import com.yuyou.train.service.api.user.entity.User;
import com.yuyou.train.service.api.user.entity.UserTotal;
import com.yuyou.train.util.bean.ResBoolSimpleInfo;

public interface IUserTotalService {
    int deleteByPrimaryKey(String id);

    int insert(UserTotal record);

    UserTotal selectByPrimaryKey(String id);
    
    UserTotal selectByUserId(String userId);

    int updateByPrimaryKeySelective(UserTotal record);
    
    /**
     * 统计用户视频时长，勋章获得判断
     * @param userId
     * @param second
     * @return
     */
	ResBoolSimpleInfo<String> updateVideoTotal(String userId,Long second);
	
	/**
	 * 统计用户班级，勋章获得判断
	 * @param userId
	 * @return
	 */
	ResBoolSimpleInfo<String> updateClassTotal(String userId);
	
	/**
	 * 统计用户课程，勋章获得判断
	 * @param user
	 * @param lesson
	 * @return
	 * @throws Exception
	 */
	ResBoolSimpleInfo<String> updateLessonTotal(User user,Lesson lesson) throws Exception;
	
	/**
	 * 统计用户考试，勋章获得判断
	 * @param userId
	 * @param getScore
	 * @param fullScore
	 * @return
	 */
	ResBoolSimpleInfo<String> updateExamFullTotal(String userId,int getScore,int fullScore);
	
	/**
	 * 统计用户作业，勋章获得判断
	 * @param userId
	 * @param getScor
	 * @return
	 */
	ResBoolSimpleInfo<String> updateHw80Total(String userId,int getScor);
	
	/**
	 * 统计用评论，勋章获得判断
	 * @param userId
	 * @return
	 */
	ResBoolSimpleInfo<String> updatecThHwTotal(String userId);

}